<h1>Listing corners</h1>

<table>
  <tr>
  <% for column in Corner.content_columns %>
    <th><%= column.human_name %></th>
  <% end %>
  </tr>
  
<% for corner in @corners %>
  <tr>
  <% for column in Corner.content_columns %>
  	<% if column.name == "binary" %>
  	<td><%= image_tag("/binary/corner/#{corner.id}") %></td>
  	<% elsif column.name == "binary_b" %>
  	<td><%= image_tag("/binary/corner_bottom/#{corner.id}") %></td>
   	<% else %>
    <td><%=h corner.send(column.name) %></td>
    <% end %>
  <% end %>
    <td><%= link_to 'Show', :action => 'show', :id => corner %></td>
    <td><%= link_to 'Edit', :action => 'edit', :id => corner %></td>
    <td><%= link_to 'Destroy', { :action => 'destroy', :id => corner }, :confirm => 'Are you sure?', :method => :post %></td>
  </tr>
<% end %>
</table>

<%= link_to 'Previous page', { :page => @corner_pages.current.previous } if @corner_pages.current.previous %>
<%= link_to 'Next page', { :page => @corner_pages.current.next } if @corner_pages.current.next %>
<br />

<%= link_to 'New corner', :action => 'new' %>
